import {apiResquest} from '@/common/js/request.js'

// 验证码
export const getImgCode = (data) => {
	return apiResquest({
		url: '/user/sendCodeOnImgCode',
		method: 'POST',
		data:data
	})
}

// 登录
export const login = (data) => {
	return apiResquest({
		url: '/user/loginAndRegister',
		method: 'POST',
		data:data
	})
}

// 自动登录
export const autoLogin = (data) => {
	return apiResquest({
		url: '/user/autoLogin',
		method: 'POST',
		data:data
	})
}

//注册设备信息
export const registerDevice = (data) => {
	return apiResquest({
		url: '/device/registerAndGetVersion',
		method: 'POST',
		data:data
	})
}

//获取域名
export const getXym = (data) => {
	return apiResquest({
		url: '/device/getXym',
		method: 'POST',
		data:data
	})
}

//获取用户信息
export const getUser = () => {
	return apiResquest({
		url: '/user/getUserInfo',
		method: 'POST'
	})
}

//退出登陆
export const signOut = () => {
	return apiResquest({
		url: '/user/signOut',
		method: 'POST'
	})
}








